// router.js

import { createRouter, createWebHistory } from 'vue-router';

const routes = [
    {
        path: '/:catchAll(.*)',
        // name: 'TempRoute',  // 这里不要加
        hidden: true,
        component: () => import('@/views/404.vue') //这个是我自己的路径
    },
    // 定义路由配置
    {
        path: '/',
        name: 'blank',
        component: () => import('@/views/blank.vue') // 根据实际路径修改
    },
    {
        path: '/animals',
        name: 'animal',
        component: () => import('@/components/animal/index.vue') // 根据实际路径修改
    },
    {
        path: '/:page/animaldetails',
        name: 'animaldetails',
        component: () => import('@/components/animal/details.vue') // 根据实际路径修改
    },
    {
        path: '/plants',
        name: 'plant',
        component: () => import('@/components/plant/index.vue')
    },
    {
        path: '/:page/plantdetails',
        name: 'plantdetails',
        component: () => import('@/components/plant/details.vue') // 根据实际路径修改
    },
    {
        path: '/otwss',
        name: 'otws',
        component: () => import('@/components/otws/index.vue')
    },
    {
        path: '/otwss/details',
        name: 'otwsdetails',
        component: () => import('@/components/otws/details.vue') // 根据实际路径修改
    },
    {
        path: '/naturalresourcess',
        name: 'naturalresources',
        component: () => import('@/components/naturalresources/index.vue')
    },
    {
        path: '/naturalresourcess/details',
        name: 'naturalresourcesdetails',
        component: () => import('@/components/naturalresources/details.vue') // 根据实际路径修改
    },
    {
        path: '/funguss',
        name: 'fungus',
        component: () => import('@/components/fungus/index.vue')
    },
    {
        path: '/:page/fungusdetails',
        name: 'fungusdetails',
        component: () => import('@/components/fungus/details.vue') // 根据实际路径修改
    },
    {
        path: '/history/animal',
        name: 'historyanimal',
        component: () => import('@/components/history/animal.vue') // 根据实际路径修改
    },
    {
        path: '/history/animal/animaldetails',
        name: 'hadetails',
        component: () => import('@/components/history/animaldetails.vue') // 根据实际路径修改
    },
    {
        path: '/history/plant',
        name: 'historyplant',
        component: () => import('@/components/history/plant.vue') // 根据实际路径修改
    },
    {
        path: '/history/plant/plantdetails',
        name: 'hpdetails',
        component: () => import('@/components/history/plantdetails.vue') // 根据实际路径修改
    },
    {
        path: '/history/fungus',
        name: 'historyfungus',
        component: () => import('@/components/history/fungus.vue') // 根据实际路径修改
    },
    {
        path: '/history/fungus/fungusdetails',
        name: 'hfdetails',
        component: () => import('@/components/history/fungusdetails.vue') // 根据实际路径修改
    },
    {
        path: '/history/otws',
        name: 'historyotws',
        component: () => import('@/components/history/otws.vue') // 根据实际路径修改
    },
    {
        path: '/history/otws/otwsdetails',
        name: 'hotails',
        component: () => import('@/components/history/otwsdetails.vue') // 根据实际路径修改
    },
    {
        path: '/history/nature',
        name: 'historynature',
        component: () => import('@/components/history/nature.vue') // 根据实际路径修改
    },
    {
        path: '/history/nature/naturedetails',
        name: 'hndetails',
        component: () => import('@/components/history/naturedetails.vue') // 根据实际路径修改
    },
    {
        path: '/appraises',
        name: 'appraise',
        component: () => import('@/components/appraise/index.vue') // 根据实际路径修改
    },
    {
        path: '/history/quadratSurvey',
        name: 'quadratSurvey',
        component: () => import('@/components/history/quadratSurvey.vue') // 根据实际路径修改
    },
    {
        path: '/history/quadratSurvey/quadratSurveyDateils',
        name: 'quadratSurveyDateils',
        component: () => import('@/components/history/quadratSurveyDateils.vue') // 根据实际路径修改
    },
    {
        path: '/appraises/details',
        name: 'appraisedetails',
        component: () => import('@/components/appraise/details.vue') // 根据实际路径修改
    },
    {
        path: '/statisticalCharts',
        name: 'statisticalChart',
        component: () => import('@/components/statisticalChart.vue') // 根据实际路径修改
    },
    {
        path: '/dataUpload',
        name: 'dataUpload',
        component: () => import('@/components/dataUpload.vue') // 根据实际路径修改
    },
    {
        path: '/demo',
        name: 'demo',
        component: () => import('@/components/demo.vue') // 根据实际路径修改
    }
    // 更多路由配置
];
//
const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    linkActiveClass: 'my-active',
    linkExactActiveClass: 'my-active', // 链接被精确匹配激活时添加的类名
    routes
});

export default router;
